package com.sl.au.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.sl.au.entity.MFOldPartRelation;

public interface MFOldPartRelationRepository extends JpaRepository<MFOldPartRelation,String> {
	/*@Query("select m from MFOldPartRelation m where m.nUpPartId = ?1 and " + 
			" m.nPartId in ( select a.nUpPartId from " + 
			"(select a.nUpPartId,COUNT(*) as number from MFOldPartRelation a where " + 
			" a.nUpPartId in (select a.nPartId from MFOldPartRelation as a where a.nUpPartId = ?1 ) group by a.nUpPartId)" + 
			" as a where a.number > 0) ")
	List<MFOldPartRelation> getpagemfsecond(int opid);*/
	
	@Query("select m.nPartId from MFOldPartRelation m where m.nUpPartId = ?1 ")
	int[] getpagemfsecond(int opid);

}
